#include"Processbar.h"

void download(callback_t cb)
{

  double filesize = 1024*1024*1024*1.0;
  double current = 0.0;
  double bandwidth = 1024*1024*1.0;

  while(current <= filesize)
  {

    cb(filesize,current);
    current += bandwidth;
   usleep(20000);

  }
  printf("\ndownload done,filesize: %lf\n",filesize);


}







int main()
{
  download(ProBar);
  //ProBar(100.0,20.1);
  //ProBar(100.0,45.8);
  //ProBar(100.0,1.0);
  return 0;
}
